import {Tag, nodes} from '@markdoc/markdoc';
import {Code} from '../../components/Code';

export default {
  render: Code,
  // attributes: nodes.fence.attributes
  attributes: {title: { type: String }, language: { type: String }},
  transform(node, config) {
    const attributes = node.transformAttributes(config);
    const children = node.transformChildren(config);    

    return new Tag(this.render, { ...attributes}, children);
  }
};
